var CLUILayer = cc.Layer.extend({
    ctor:function () {
        this._super();
    },

    onEnter:function () {
        this._super();
        cc.log("=======CLUILayer onEnter===========");
        //加载左上角按钮
        this.loadTopLeftButtons();
    },

    //加载左上角按钮
    loadTopLeftButtons:function () {
        var leftPanal = new ccui.ImageView(res.cl_stagemap_toolbar_leftbg_png);
        this.addChild(leftPanal);
        leftPanal.setAnchorPoint(cc.p(0,1));
        leftPanal.setPosition(cc.p(0,cc.winSize.height));

        //加载首页
        this.loadHomeButtom(leftPanal);
        //加载商店

        //加载排行榜

    },

    loadHomeButtom:function (root) {
        var node = new ccui.Button();
        root.addChild(node);
        node.loadTextures(res.cl_stagemap_toolbar_home_png,res.cl_stagemap_toolbar_home_png,"");
        node.setPressedActionEnabled(true);
        node.setZoomScale(0.2);
        node.setAnchorPoint(cc.p(0,0));
        node.setPosition(10,10);
        node.addTouchEventListener(function (sender,type) {
            if(type === ccui.Widget.TOUCH_ENDED){
                cc.director.runScene(new MainMenuScene);
            }
        },this);

    },
});